const mongoose = require('mongoose');
const {db}= require('../config/config')

mongoose.set('strictQuery', true)
mongoose.connect(db,{useNewUrlParser: true, useUnifiedTopology: true })
.then(()=>console.log('数据库连接成功'))
.catch((err)=> console.log(err,'数据库连接失败')); 